#include "mapperinc.h"

struct ines_boardid_s {
	int num;
	int boardid;
};

#define INES_BOARD_START()		static struct ines_boardid_s boards[] = {
#define INES_BOARD_END()		{0,-1}};
#define INES_BOARD(n,b)			{n,b},

INES_BOARD_START()
	INES_BOARD(0,		B_NROM)
	INES_BOARD(1,		B_SxROM)
	INES_BOARD(2,		B_UxROM)
	INES_BOARD(3,		B_CNROM)
	INES_BOARD(4,		B_TxROM)
	INES_BOARD(5,		B_ExROM)
	INES_BOARD(6,		B_FFE_MAPPER6)
	INES_BOARD(7,		B_AxROM)
	INES_BOARD(8,		B_FFE_MAPPER8)
	INES_BOARD(9,		B_PxROM)
	INES_BOARD(10,		B_FxROM)
	INES_BOARD(11,		B_74x377)
	INES_BOARD(13,		B_CPROM)
	INES_BOARD(17,		B_FFE_MAPPER17)
	INES_BOARD(18,		B_SS8806)
	INES_BOARD(19,		B_NAMCOT_163)
	INES_BOARD(21,		B_VRC4A)		//could also be VRC4C
	INES_BOARD(22,		B_VRC2A)
	INES_BOARD(23,		B_VRC2B)
	INES_BOARD(24,		B_VRC6A)
	INES_BOARD(25,		B_VRC4B)		//could also be VRC4D
	INES_BOARD(26,		B_VRC6B)
	INES_BOARD(36,		B_TXC_STRIKEWOLF)
	INES_BOARD(41,		B_CALTRON6IN1)
	INES_BOARD(42,		B_BIOMIRACLEA)
	INES_BOARD(64,		B_TENGEN_800032)
	INES_BOARD(65,		B_IREM_H_3001)
	INES_BOARD(66,		B_GxROM_MxROM)
	INES_BOARD(70,		B_74x161x161x32)
	INES_BOARD(73,		B_VRC3)
	INES_BOARD(75,		B_VRC1)
	INES_BOARD(85,		B_VRC7B)
	INES_BOARD(87,		B_74x139x74)
	INES_BOARD(88,		B_DxROM)
	INES_BOARD(95,		B_NAMCOT_3425)
	INES_BOARD(105,	B_EVENT)
	INES_BOARD(107,	B_MAGICSERIES)
	INES_BOARD(123,	B_H2288)
	INES_BOARD(133,	B_SA_72008)
	INES_BOARD(137,	B_SACHEN_8259D)
	INES_BOARD(138,	B_SACHEN_8259B)
	INES_BOARD(139,	B_SACHEN_8259C)
	INES_BOARD(141,	B_SACHEN_8259A)
	INES_BOARD(143,	B_SACHEN_TCA01)
	INES_BOARD(145,	B_SA_72007)
	INES_BOARD(148,	B_SA_0037)
	INES_BOARD(149,	B_SA_0036)
	INES_BOARD(150,	B_SACHEN_74LS374N)
	INES_BOARD(188,	B_BANDAI_KARAOKE)
	INES_BOARD(189,	B_TXC_TW)
	INES_BOARD(206,	B_DxROM)
	INES_BOARD(241,	B_TXC_MXMDHTWO)
INES_BOARD_END()

int get_ines_boardid(int num)
{
	int i;

	for(i=0;boards[i].boardid != -1;i++) {
		if(num == boards[i].num)
			return(boards[i].boardid);
	}
	return(B_UNSUPPORTED);
}
